﻿//PropertyGroup下<ImplicitUsings>enable</ImplicitUsings>就可以不引用以上3个命名空间
using Extentions;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.Threading;
using TrainingReminderSystem.Bll;
using TrainingReminderSystem.Bll.AutoRun;
using TrainingReminderSystem.Filters;
using TrainingReminderSystem.Model;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
WebApplication app = builder.Build<ActionFilterAttributeLogin, LogExceptionAttribute>(PcLoginedBll.PcTokenKey, "TrainingReminderSystem.Bll", "TrainingReminderSystem.Model");

app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Home}/{action=Index}/{id?}");

//如果有启动代码,加在app.Run()前面
//websocket开启
WebSocketBll.Start();
SysConfig.EnumRunProject = EnumRunProject.系统后台端;
//新线程执行
NewThreadRun.Start();

app.Run();
